The invention relates generally to computer systems, and more particularly to an improved method and system for caching network files on a client computer system.
The caching of network information on a local computer has two main advantages, a first being the ability to access the information when the local computer is disconnected from the network, and a second being a reduction in the amount of data transmitted on the network server to the client. The benefit to having network information available when disconnected is readily apparent, i.e., network users may work on files when disconnected from the network, such as when traveling, working at home, or at times when the network is down. This is highly important, as more and more corporations require that company data be stored on the network, and at the same time require their employees to be more mobile and be able to continue working even when fully disconnected from the corporate network. Benefits to reducing the amount of transmitted data include a reduction in the server workload, a reduction in the client""s perceived latency, and an increase in available network bandwidth.
U.S. Pat. No. 5,721,916, assigned to the assignee of the present invention and hereby incorporated by reference in its entirety, describes a caching (shadowing) method and system that was designed to operate on multiple types of networks. While this shadowing method and system provide the above-described advantages of offline access and reduced communication, certain drawbacks are inherent therewith. One drawback is that the system architecture is complex and inefficient, primarily resulting from the supporting of multiple network types. For example, the caching mechanism of the shadowing system and method is located separately from the network redirectors, whereby the redirector needs to exchange a lot of information with the caching mechanism to properly cache the files. Another drawback was in the area of security, for example, those with access to the disconnected client machine had access to the cached data. Lastly, other improvements, enhancements and optimizations to existing client-side caching are generally needed.
Briefly, the present invention provides a system and method for improved client-side caching that transparently caches suitable network files for offline use. A cache mechanism in a network redirector transparently intercepts requests to access server files, and if the requested file is locally cached, satisfies the request from the cache when possible. For files existing locally, local and remote timestamps may also be compared to ensure that the local file is current. Otherwise the cache mechanism creates a local cache file and satisfies the request from the server, and also fills in sparse cached files as reads for data in ranges that are missing in the cached file are requested and received from the server. The cache mechanism also sends write requests to both files to keep the files concurrent and extend them as necessary. A background process further fills in local files that are sparse, using the existing handle of already open server files, or opening, reading from and closing other server files. Security is also provided by maintaining security information received from the server for files that are in the cache, and using that security information to determine access to the file when offline.